#include "Camera.h"

	Camera::Camera(int x, int y, int w, int h)
	{
		CameraRect.x = x;
		CameraRect.y = y;
		CameraRect.w = w;
		CameraRect.h = h;
	}

	Camera::Camera()
	{
		CameraRect.x = CameraRect.y = CameraRect.w = CameraRect.h = 0;
	}

	void Camera::Update(int x, int y)
	{
		//Moves camera
		CameraRect.x += x;
		CameraRect.y += y;
	}

	void Camera::reset(int x, int y)
	{
		CameraRect.x = x-(CameraRect.w/2);
		CameraRect.y = y-(CameraRect.h/2);
	}

	int Camera::getx()
	{
		return CameraRect.x;
	}

	int Camera::gety()
	{
		return CameraRect.y;
	}
